using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;


namespace GNetDesktop
{
    public partial class frmReportEX : Form
    {
        private string strFile;
        public frmReportEX(string FileNme)
        {
            strFile = FileNme;
            InitializeComponent();
        }

        private void frmReportEX_Load(object sender, EventArgs e)
        {
            reportView.DoReadVts(strFile);
        }

        private void frmReportEX_FormClosed(object sender, FormClosedEventArgs e)
        {
            System.IO.File.Delete(strFile);
        }

        private void tbnSave_Click(object sender, EventArgs e)
        {
            saveFileDialog1.Filter = "XLS(*.XLS)|*.XLS";
            DialogResult ret = saveFileDialog1.ShowDialog();
            if (ret != DialogResult.OK) return;

            if (saveFileDialog1.FileName.Length > 0)
            {
                reportView.DoWriteXls(saveFileDialog1.FileName);
            }
        }

        private void tbnPrint_Click(object sender, EventArgs e)
        {
            reportView.DoPrintView();
        }
    }
}